package com.china.juju.entity;


import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name="juju_buy"
    ,catalog="zutuan_prot"
)
public class JujuBuy  implements java.io.Serializable {

    private static final long serialVersionUID = 1L;

    public static final String ENTITY_NAME = "com.china.juju.entity.JujuBuy";
	public static final String TABLE_NAME="juju_buy";

    public static final String PK_Field = "id"; 
    public static final String PK_Method = "getId";  
	
	public static final String P_id = "id"; 
	public static final String P_goodsid = "goodsid"; 
	public static final String P_goodsname = "goodsname"; 
	public static final String P_name = "name"; 
	public static final String P_tel = "tel"; 
	public static final String P_address = "address"; 
	public static final String P_remark = "remark"; 
	public static final String P_userid = "userid"; 
	public static final String P_username = "username"; 
	public static final String P_spend = "spend"; 
	public static final String P_organid = "organid"; 
	public static final String P_organname = "organname"; 
	public static final String P_createtime = "createtime"; 
	public static final String P_goodsnum = "goodsnum"; 
	public static final String P_price = "price"; 
	public static final String P_totalprice = "totalprice"; 
	public static final String P_state = "state"; 

     private String id;
     private String goodsid;
     private String goodsname;
     private String name;
     private String tel;
     private String address;
     private String remark;
     private String userid;
     private String username;
     private Integer spend;
     private String organid;
     private String organname;
     private Date createtime;
     private Integer goodsnum;
     private Integer price;
     private Integer totalprice;
     private Integer state;

    public JujuBuy() {
    }
	
    public JujuBuy(String id) {
        this.id = id;
    }
    public JujuBuy(String id, String goodsid, String goodsname, String name, String tel, String address, String remark, String userid, String username, Integer spend, String organid, String organname, Date createtime, Integer goodsnum, Integer price, Integer totalprice, Integer state) {
        this.id = id;
        this.goodsid = goodsid;
        this.goodsname = goodsname;
        this.name = name;
        this.tel = tel;
        this.address = address;
        this.remark = remark;
        this.userid = userid;
        this.username = username;
        this.spend = spend;
        this.organid = organid;
        this.organname = organname;
        this.createtime = createtime;
        this.goodsnum = goodsnum;
        this.price = price;
        this.totalprice = totalprice;
        this.state = state;
    }
   
    @Id 
    @GeneratedValue( generator="paymentableGenerator")  
    @GenericGenerator(name="paymentableGenerator", strategy="uuid")  
    
    @Column(name="id", unique=true, nullable=false, length=36)
    public String getId() {
        return this.id;
    }
    
    public void setId(String id) {
        this.id = id;
    }
    
    @Column(name="goodsid", length=36)
    public String getGoodsid() {
        return this.goodsid;
    }
    
    public void setGoodsid(String goodsid) {
        this.goodsid = goodsid;
    }
    
    @Column(name="goodsname", length=200)
    public String getGoodsname() {
        return this.goodsname;
    }
    
    public void setGoodsname(String goodsname) {
        this.goodsname = goodsname;
    }
    
    @Column(name="name", length=100)
    public String getName() {
        return this.name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    @Column(name="tel", length=100)
    public String getTel() {
        return this.tel;
    }
    
    public void setTel(String tel) {
        this.tel = tel;
    }
    
    @Column(name="address", length=1000)
    public String getAddress() {
        return this.address;
    }
    
    public void setAddress(String address) {
        this.address = address;
    }
    
    @Column(name="remark", length=1000)
    public String getRemark() {
        return this.remark;
    }
    
    public void setRemark(String remark) {
        this.remark = remark;
    }
    
    @Column(name="userid", length=36)
    public String getUserid() {
        return this.userid;
    }
    
    public void setUserid(String userid) {
        this.userid = userid;
    }
    
    @Column(name="username", length=200)
    public String getUsername() {
        return this.username;
    }
    
    public void setUsername(String username) {
        this.username = username;
    }
    
    @Column(name="spend")
    public Integer getSpend() {
        return this.spend;
    }
    
    public void setSpend(Integer spend) {
        this.spend = spend;
    }
    
    @Column(name="organid", length=36)
    public String getOrganid() {
        return this.organid;
    }
    
    public void setOrganid(String organid) {
        this.organid = organid;
    }
    
    @Column(name="organname", length=200)
    public String getOrganname() {
        return this.organname;
    }
    
    public void setOrganname(String organname) {
        this.organname = organname;
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="createtime", length=19)
    public Date getCreatetime() {
        return this.createtime;
    }
    
    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }
    
    @Column(name="goodsnum")
    public Integer getGoodsnum() {
        return this.goodsnum;
    }
    
    public void setGoodsnum(Integer goodsnum) {
        this.goodsnum = goodsnum;
    }
    
    @Column(name="price")
    public Integer getPrice() {
        return this.price;
    }
    
    public void setPrice(Integer price) {
        this.price = price;
    }
    
    @Column(name="totalprice")
    public Integer getTotalprice() {
        return this.totalprice;
    }
    
    public void setTotalprice(Integer totalprice) {
        this.totalprice = totalprice;
    }
    
    @Column(name="state")
    public Integer getState() {
        return this.state;
    }
    
    public void setState(Integer state) {
        this.state = state;
    }



    @Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
}


